const router = require('koa-router')()
const { fetchRecommend } = require('../api')

router.get('/recommend', async (ctx, next) => {
    try {
        const data = await fetchRecommend();
        ctx.body = {data: data.cases}
    } catch(e) {
        next(e)
    }
})

module.exports = router.routes()